<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var img =document.createElement('img');
        img.src = 'https://img.alicdn.com/imgextra/i4/2455568780/O1CN01Nk1d6j2EjI2sQQfrK_!!2455568780.jpg_430x430q90.jpg';
        // 按钮 <input type="submit" value='xx' /> <button>xxx</button>
        var btn1 = document.createElement('button')
        btn1.innerText = '按钮';

        var btn2 = document.createElement('input');
        btn2.type = 'button'; // 不写则默认是文本框
        btn2.value = '按钮';
        // 创建div
        var div = document.createElement('div');
        // 将图片放入div
        div.appendChild(img);
        // div 和按钮显示在网页中
        document.body.appendChild(div);

        document.querySelector('body').appendChild(btn1);
        document.body.appendChild(btn2)



    </script>
</body>
</html>